<div class="row" ng-controller="businessController">
    <!-- Modal -->
    <div class="modal fade" id="updateModal" tabindex="-1" role="dialog" aria-labelledby="updateModalLabel">
        <div class="modal-dialog" role="document">
            <form name="updform" class="form-validation form-horizontal">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="updateModalLabel">修改商家信息</h4>
                    </div>
                    <div class="modal-body">
                        <!--修改-->
                        <div class="row" >
                            <div class="col-md-12">

                                <div class="form-group character-counter">
                                    <label  class="control-label col-md-2">我的商家</label>

                                    <div class="col-md-10">
                                        <input type="text" class="form-control"  placeholder="请输入商家名称" ng-model="business.name" value="{{business.name}}" maxlength="50" required/>
                                        <label class="character-counter-label-2" ng-bind="(business.name != undefined ? business.name.length : 0)+' / 50'">
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group character-counter">
                                    <label  class="control-label col-md-2">我的地址</label>

                                    <div class="col-md-10">
                                        <input type="text" class="form-control" placeholder="请输入我的地址" ng-model="business.address" value="{{business.address}}" maxlength="50" required/>
                                        <label class="character-counter-label-2" ng-bind="(business.address != undefined ? business.address.length : 0)+' / 50'">
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group character-counter">
                                    <label  class="control-label col-md-2">我的登录密码</label>

                                    <div class="col-md-10">
                                        <input type="text" class="form-control" placeholder="请输入我的登录密码" ng-model="business.password" value="{{business.password}}" maxlength="50" required/>
                                        <label class="character-counter-label-2" ng-bind="(business.password != undefined ? business.password.length : 0)+' / 50'">
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group character-counter">
                                    <label  class="control-label col-md-2">我的联系方式</label>

                                    <div class="col-md-10">
                                        <input type="text" class="form-control" placeholder="请输入我的联系方式" ng-model="business.phone" value="{{business.phone}}" maxlength="50" required/>
                                        <label class="character-counter-label-2" ng-bind="(business.phone != undefined ? business.phone.length : 0)+' / 50'">
                                        </label>
                                    </div>
                                </div>

                            </div>
                        </div>
                        <!--修改-->
                    </div>
                    <div class="modal-footer">
                        <button class="btn btn-primary"  ng-click="updateBusiness(business)" ng-disabled="updform.$invalid" data-dismiss="modal">提交</button>
                        <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="col-md-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h1 class="panel-title">
                    我的商家信息列表
                </h1>
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-12">
                        <table class="table table-hover table-cell table-bordered">
                            <thead>
                            <tr>
                                <th></th>
                                <th>我的商家</th>
                                <th>我的地址</th>
                                <th>我的登录密码</th>
                                <th>我的联系方式</th>
                                <th>我的审核状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="business in businesses">
                                <td>{{$index+1}}</td>
                                <td>{{business.name}}</td>
                                <td>{{business.address}}</td>
                                <td>{{business.password}}</td>
                                <td>{{business.phone}}</td>
                                <td>{{business.status | statusFilterManage}}</td>
                                <td>
                                    <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#updateModal" ng-click="update(business)">修改
                                    </button>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="panel-footer">
                <a href="#/businessWelcome" class="btn btn-info">返回首页</a>
            </div>
        </div>
    </div>

</div>
